<template>
  <a-button type="primary" @click="saixuanClick({ type: 'one', value: '111' })">条件一---1</a-button>
  <a-button type="primary" @click="saixuanClick({ type: 'one', value: '222' })">条件一---2</a-button>
  <a-button type="primary" @click="saixuanClick({ type: 'one', value: '333' })">条件一---3</a-button>
  <a-button type="primary" @click="saixuanClick({ type: 'two', value: '111' })">条件二---1</a-button>
  <a-button type="primary" @click="saixuanClick({ type: 'two', value: '222' })">条件二---2</a-button>
  <a-button type="primary" @click="saixuanClick({ type: 'two', value: '333' })">条件二---3</a-button>
  <a-button type="primary" @click="saixuanClick({ type: 'three', value: '111' })">条件三---1</a-button>
  <a-button type="primary" @click="saixuanClick({ type: 'three', value: '222' })">条件三---2</a-button>
  <a-button type="primary" @click="saixuanClick({ type: 'three', value: '333' })">条件三---3</a-button>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue'
export default defineComponent({
  name: 'AAA'
})
</script>
<script lang="ts" setup>
const params = ref({
  oneValue: '',
  twoValue: '',
  threeValue: ''
})
const saixuanClick = async (obj: object) => {
  switch (obj.type) {
    case 'one':
      params.value.oneValue = obj.value
      break
    case 'two':
      params.value.twoValue = obj.value
      break
    case 'three':
      params.value.threeValue = obj.value
      break
    default:
      break
  }

  // 统一发送请求
  // const res = await xxxx()
}
</script>

<style scoped>
</style>